package com.itheima.springboot_22_task.quartz;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component //这个注解,定义一个bean,只有有了这个注解,spring才能加载这个bean
public class MyBean {
    @Scheduled(cron="0/5 * * * * ?")
    public void print(){
        System.out.println(Thread.currentThread().getName()+":bbbbbbbb");
    }
}
